# PureBasic plugin makefile
#

LIBRARY = Simple
LIBRARYFILE = $(PUREBASIC)\PureLibraries\$(LIBRARY)
DEPENDENCIES = Simple.h

# Just add all your standard .c file here
#
OBJECTS = Simple.obj \
StringMultiply.obj \
MessageBox.obj \
FloatReturn.obj \
Simple_DEBUG.obj \

# All all you unicode specific routine here (with the _UNICODE.obj postfix)
#
OBJECTS_UNICODE = StringMultiply_UNICODE.obj \
MessageBox_UNICODE.obj \

# need to add one empty tab line after the target, otherwise it failes here!?
$(LIBRARY): $(LIBRARYFILE)
	

$(LIBRARYFILE) : $(OBJECTS) $(OBJECTS_UNICODE)
	$(PUREBASIC)\Compilers\polib /out:$(LIBRARY).lib $(OBJECTS) $(OBJECTS_UNICODE)
	"$(PUREBASIC)\Library SDK\LibraryMaker.exe" $(LIBRARY).desc /TO $(PUREBASIC)\PureLibraries\UserLibraries\ /COMPRESSED

clean:
	rm -f *.obj *.lib PureLibrariesMaker.log

# General rules to compile all the files at once
#
%_UNICODE.obj : %.c $(DEPENDENCIES)
	$(LCC)\lcc.exe -unused -O -DUNICODE -c $< -Fo$@

%.obj : %.c $(DEPENDENCIES)
	$(LCC)\lcc.exe -unused -O -c $<

